package com.kexinxin.util.matching;

public class EdgeNode implements Comparable {
	public int weight;
	public int u, v;
	public String startName;
	public String endName;

	public EdgeNode(int uu, int vv, int ww, String startName, String endName) {
		u = uu;
		v = vv;
		weight = ww;
		this.startName = startName;
		this.endName = endName;
	}

	public EdgeNode() {

	}

	public EdgeNode(int weight, int u, int v) {
		super();
		this.weight = weight;
		this.u = u;
		this.v = v;
	}

	public int compareTo(Object x) {
		double xw = ((EdgeNode) x).weight;
		if (weight < xw)
			return -1;
		if (weight == xw)
			return 0;
		return 1;
	}
}